Skip to content

build: link against swiftOnoneSupport in debug configuration #389

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2018

Conversation

compnerd
Copy link
Member

When building debug, swift requires a supplementary library. The swift driver
is aware of this and will make the appropriate arrangements. However, since the
swift component is compacted into the C library, the linker driver being used
does not understand this requirement. Explicitly link against the support
library. This allows building the debug configuration of libdispatch with a
release configuration of the swift standard library.

When building debug, swift requires a supplementary library.  The swift driver
is aware of this and will make the appropriate arrangements.  However, since the
swift component is compacted into the C library, the linker driver being used
does not understand this requirement.  Explicitly link against the support
library.  This allows building the debug configuration of libdispatch with a
release configuration of the swift standard library.
@compnerd
Copy link
Member Author

CC: @MadCoder

@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Aug 9, 2018

@MadCoder ping

@ktopley-apple ktopley-apple self-requested a review August 20, 2018 14:30
@ktopley-apple ktopley-apple merged commit 57139c6 into swiftlang:master Aug 20, 2018
@aschwaighofer
Copy link

@compnerd This commit caused failures on the LSAN bot. https://ci.swift.org/job/oss-swift-incremental-RA-lsan-linux-ubuntu-16_10/4863

The failures look like false positives to me: Memory leaks in SIL instructions should have been caught earlier during building the Swift dylib and overlays.

@aschwaighofer
Copy link

@compnerd Actually, I was wrong. We have known leaks in the sanitizer. This change just caused libdispatch to be build optimized instead of in a debug configuration and now we see those leaks.
We should probably use the standard library build type instead of the swift tools build type for building libdispatch.

@aschwaighofer
Copy link

That should have read: "We have known leaks in the optimizer."

@aschwaighofer
Copy link

swiftlang/swift#18898

@compnerd compnerd deleted the debug branch August 22, 2018 15:49
ktopley-apple added a commit that referenced this pull request Dec 6, 2018
build: link against swiftOnoneSupport in debug configuration
Signed-off-by: Kim Topley <ktopley@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants